package com.example.lpf.darfloatactionbutton;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    private FloatButton tvFloat;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tvFloat = (FloatButton) findViewById(R.id.tv_float);

        tvFloat.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                  Toast.makeText(MainActivity.this, "点击了图标", Toast.LENGTH_SHORT).show();

            }
        });
    }
}
